\section{Schemes...}
\begin{lemma}
Let $f:Y\rightarrow X$ be a morphism of affine schemes, then $f$ is locally of finite type iff $f^{\#}_X:\bcO_X(X)\rightarrow\bcO_Y(Y)$ is an algebra of finite presentation.
\end{lemma}
\begin{proof}
\tcb{EGA 4 1, 328}.
\end{proof}
\begin{lemma}
The category of schemes $\Sch$ is a complete category, but it is not cocomplete, $\Spec \ZZ$ is its terminal object.
\end{lemma}
\begin{proof}
\tcb{type using Harshone P87}
\end{proof}
\tcb{When does the residue field equal the field on which the scheme/variety is defined?}
\begin{lemma}(Scheme-Theoretical Image)\textup{\cite[$\S$ II, Ex 3.11, P 92]{Har77}}\\
Let $(f,f^{\#}):(X,\bcO_X)\rightarrow (Y,\bcO_Y)$ be a morphism of schemes, then there exist a closed subscheme $(i,i^{\#}):(X_f,\bcO_{X_f})\nhookrightarrow (Y,\bcO_Y)$, such that $(f,f^{\#})$ factors uniquely through $(i,i^{\#})$. Furthermore, for every such closed subscheme $(j,j^{\#}):(Z_f,\bcO_Z)\nhookrightarrow (Y,\bcO_Y)$ , $(i,i^{\#})$ factors uniquely through $(j,j^{\#})$.
\end{lemma}
\begin{proof}
\noindent Let $(j,j^{\#}):(Z_f,\bcO_Z)\nhookrightarrow (Y,\bcO_Y)$  be a closed subscheme of $(Y,\bcO_Y)$, such that $\exists! (g,g^{\#}):(X,\bcO_X)\rightarrow (Z,\bcO_Z)$ for which $(f,f^{\#})=(j,j^{\#})\circ (g,g^{\#})$. \tcb{The set of such closed subschemes is not empty, that $(id_Y,id_{\bcO_Y})$ belongs to it.}\\
\noindent Denote $Y'=\overline{\Imm f}\subseteq Y$, the topological closure of the image of $f$. Let $i:Y'\rightarrow Y$ be the canonical inclusion of topological spaces. Then, it is easy to see that there is a unique continuous map $f':X\rightarrow Y'$, giving by $f'(x)=f(x)\forall x\in X$, such that $f=i\circ f'$.\\
\noindent Define $h:\Imm f\rightarrow Z$, $h(f(x))=g(x)$, since $j$ is a monomorphism, and $f=j\circ g$, it is easy to see that $h$ is a well defined continuous map, and satisfies $i|_{\Imm f}=j\circ h$, and that it is the unique such continuous map. $\Imm f$ is dense  in $Y'$, hence $h$ extends uniquely the continuous map $j_{'}:Y'\rightarrow Z$. Furthermore, $i=j\circ j_{'}$\\
\noindent \tcb{$\forall y\in Y', \exists \{y_n=f(x_n)\}_{n\in \NN}$ a sequence in $\Imm f$, such that $y=\displaystyle \lim_{n\rightarrow \infty} f(x_n)$. $\{f(x_n)\}_{n\in \NN}$ converges to $y$, hence it is Cauchy, and so is $\{g(x_n)=h(f(x_n))\}_{n\in \NN}$, and it converges in the $Z$. Then, $j_{'}(y)=\displaystyle \lim_{n\rightarrow \infty} g(x_n)$.}\\
Then we have the commutative diagram:
$$
\xymatrix{
X\ar[rr]^f	\ar@{-->}[rd]|{f'}\ar@{-->}[rddd]_{g}&		&	Y\\
			&Y'\ar@{^(->}[ur]|i\ar@{_(-->}[dd]|{j_{'}}	&\\\\
			&Z\ar@{^(->}[uuur]_j	&
}
$$
Consider the exact sequence of sheaves on $Y$:\\
$\xymatrix{0\ar[r]&\bcI_X\ar@{^(->}[r]&\bcO_Y\ar[r]^{f^{\#}}&f_{\ast}\bcO_X}$\\
We notice on the level of stalks that $\bcI_{X,\goq}\cong\bcO_{Y,\goq}$ for $\goq\nin \Imm f\subseteq\Imm i$. Hence, $( \bcO_Y/\bcI_X )_{\goq}=0$ for $\goq\nin \Imm i$.
Then define the sheaf $\bcO_{Y'}$ on $Y'$ to be $i^{-1}\ \bcO_Y/\bcI_X $. Notice that, since $(i,i^{\#})$ is a closed subscheme of $(Y,\bcO_Y)$, then $i_{\ast}\bcO_{Y'}\cong \bcO_Y/\bcI_X$, that on stalks, we have, $\forall \goq\in Y:$\\
$(i_{\ast}i^{-1}\ \bcO_Y/\bcI_X )_{\goq}=
\left\{\begin{array}{ll}
(i^{-1}\ \bcO_Y/\bcI_X )_{i^{-1}(\goq)}&\goq\in \Imm i\\
0& \goq\nin \Imm i
\end{array}
\right.=
\left\{\begin{array}{ll}
( \bcO_Y/\bcI_X )_{\goq}&\goq\in \Imm i\\
0& \goq\nin \Imm i
\end{array}
\right.=( \bcO_Y/\bcI_X )_{\goq}
$\\

\noindent Let $i^{\#}:\bcO_Y\twoheadrightarrow i_{\ast}\bcO_{Y'}\cong \bcO_Y/\bcI_X$ be the canonical injection. Since $\xymatrix{\bcI_X\ar@{^(->}[r]&\bcO_Y\ar[r]&f_{\ast}\bcO_X}$ is zero, then there is a unique morphism of sheaves $u:i_{\ast}\bcO_{Y'}\rightarrow f_{\ast}\bcO_X$, that makes the following diagram commutate:
\noindent $$
\xymatrix{
f_{\ast}\bcO_X&&\bcO_Y\ar@{->>}[ld]^{i^{\#}}\ar[ll]_{f^{\#}}\\
&i_{\ast}\bcO_{Y'}\ar@{-->}[lu]^{u}&
}
$$
\noindent We have the commutative diagram:
\noindent $$
\xymatrix{
f_{\ast}\bcO_X&&\bcO_Y\ar@{->>}[ld]^{j^{\#}}\ar[ll]_{f^{\#}}\\
&j_{\ast}\bcO_{Z}\ar[lu]^{j_{\ast}g^{\#}}&
}
$$
\noindent Since $\xymatrix{\bcI_Z\ar@{^(->}[r]&\bcO_Y\ar@{->>}[r]^{j^{\#}}&j_{\ast}\bcO_Z}$ is zero, then $\xymatrix{\bcI_Z\ar@{^(->}[r]&\bcO_Y\ar[r]^{f^{\#}}&f_{\ast}\bcO_X}$, hence there is a unique morphism of sheaves $v:\bcI_Z\hra \bcI_X$ that makes the following diagram commute:
$$
\xymatrix{\bcI_Z\ar@{^(-->}[rr]^v\ar@{^(->}[dr]&&\bcI_X\ar@{_(->}[dl]\\
&\bcO_Y&
}
$$
\noindent $\xymatrix{\bcI_X\ar@{^(->}[r]&\bcO_Y\ar@{->>}[r]^{i^{\#}}&i_{\ast}\bcO_{Y'}}$ is zero, then $\xymatrix{\bcI_Z\ar@{^(->}[r]&\bcO_Y\ar@{->>}[r]^{i^{\#}}&i_{\ast}\bcO_{Y'}}$ is zero. Since $(j,j^{\#})$ is a closed embedding, then $j_{\ast}\bcO_Z\cong \bcO_Y/\bcI_Z$, hence there is a unique morphism of sheaves $t:j_{\ast}\bcO_Z\twoheadrightarrow i_{\ast}\bcO_{Y'}$ that makes the following diagram commute:
\noindent $$
\xymatrix{
&\bcO_Y\ar@{->>}[ld]_{i^{\#}}\ar[ddl]^{j^{\#}}\\
i_{\ast}\bcO_{Y'}&\\
j_{\ast}\bcO_{Z}\ar@{-->>}[u]^{t}&
}
$$
\noindent Then, we have the commutative diagrams:
\noindent $$
\xymatrix{
\bcI_Z\ar@{^(->}[rd]\ar@{^(-->}[dd]_v&&i_{\ast}\bcO_{Y'}\ar[rd]^u&\\
&\bcO_Y\ar@{->>}[ru]^{i^{\#}}\ar@{->>}[rd]_{j^{\#}}\ar[rr]&&f_{\ast}\bcO_X\\
\bcI_X\ar@{^(->}[ru]&&j_{\ast}\bcO_{Z}\ar[ru]_{j_{\ast}g^{\#}}\ar@{-->>}[uu]&
}
$$
\noindent $$
\xymatrix{
f_{\ast}\bcO_X&&\bcO_Y\ar@{->>}[ld]_{i^{\#}}\ar[dddl]^{j^{\#}}\ar[ll]_{f^{\#}}\\
&i_{\ast}\bcO_{Y'}\ar@{-->}[lu]_u&\\\\
&j_{\ast}\bcO_{Z}\ar@{-->>}[uu]_{t}\ar[luuu]^{j_{\ast}g^{\#}}&
}
$$
\tcb{
\noindent Show that $(Y',\bcO_{Y'})$ is a scheme, and that $(i,i^{\#})$ is a closed embedding.\\
$u$ and $t$ are not the needed morphisms. Show the existence and uniqueness of the needed morphisms.\\
Type the conclusion\\
Examples of ringed spaces which are not schemes\\
Show that $f_{\ast}$ and $f^{-1}$ are functors.
}
\end{proof}
\begin{lemma}[Reduced Induced Closed Subscheme Structure]\label{ReducedInduced}
Let $X$ be a scheme, $Z\subseteq X$ a closed subset. Then there is a unique reduced closed sub-scheme of $X$ with underlying topological space coincide with $Z$.
\end{lemma}
\begin{proof}
\cite[\href{http://stacks.math.columbia.edu/tag/01J3}{Tag 0123}]{stacks-project}
\end{proof}
\noindent The closed sub-scheme in \ref{ReducedInduced} is called the reduced induced closed sub-scheme of $Z$ in $X$ and denoted by $Z_{red}$
\begin{lemma}
Let $X$ be a scheme, $Z\subseteq X$ a closed subset. $Z_{red}$ is the smallest closed sub-scheme in $X$ with underlying space $Z$.
\end{lemma}
\begin{lemma}\label{SchCoproduct}
The category of $\Sch/S$ has a \tcb{finite} co-product.
\end{lemma}
\begin{proof}
Let $X,Y$ be schemes, and consider the ringed space $X\coprod Y:=(|X|\bigsqcup|Y|,i_{\ast}\bcO_X\times j_{\ast}\bcO_Y)$, where $i:|X|\hookrightarrow |X|\bigsqcup |Y|$ and $j:|Y|\hookrightarrow |X|\bigsqcup |Y|$ are the canonical embeddings. \tcb{We can readily see that $X\coprod Y$ is a \tcr{scheme} over $S$, moreover it is the co-product of $X$ and $Y$.}
\end{proof}
\begin{lemma}\label{SchDistributive}
In the category $\Sch/S$, the product is distributive over \tcr{finite} co-product.
\end{lemma}
\begin{proof}
\tcb{The proof is based on the fact that tensor product of rings is distributive over the direct product of rings.}
\end{proof}
\begin{lemma}\label{SchOpIntersection}
Let $X$ be a scheme, $U_1,U_2$ a family of open subschemes of $X$. Then, $U_1\times_X U_2$ coincide with the open subscheme with the underlying topological space $|U_1| \bigcap |U_2|$.
\end{lemma}

\begin{lemma}\label{SchOpUnion}
Let $X$ be a scheme, $\{j_i:U_i\hookrightarrow X\}_{i\in I}$ a family of open subschemes of $X$. Then, the open subscheme $\displaystyle\bigcup_{i\in I}U_i$ coincide with the colimit of the embedding functor from the $\goi:\mathbf{OpSch_I}/X\rightarrow \mathbf{OpSch}/X$, where $\mathbf{OpSch}/X$ the category of open subschemes in $X$ with the morphisms being the embeddings, and $\mathbf{OpSch_I}/X$ the full subategory of $\mathbf{OpSch}/X$ with objects being open subschemes of $U_i$ for some $i\in I$.
\end{lemma}
\noindent Here the union as in gluing schemes. This colimit always exist.\\
\tcb{The above definition might need to be restricted to fiber product to avoid the need of the below lemma, in case it was not correct.}
\begin{lemma}\label{SchOpSubFiber}
Let $f:Y\rightarrow X$ a morphism of schemes, $U$ an open subscheme of $X$, then for any open subscheme $V$of $Y\times_X U$, there is a open subscheme $W$ of $U$ such that $Y\times_X W\cong V$.
\end{lemma}
\begin{lemma}\label{SchDisFberUnion}
Let $X$ be a scheme, $\{f_i:X_i\rightarrow X\}_{i\in I}$ a family of scheme morphisms. If $I$ is finite, then $\displaystyle\bigcup_{i\in I} (Y\times_X X_i)\cong Y\times_X \displaystyle\bigcup_{i\in I} X_i$.
\end{lemma}

\begin{counterexample}
Give an example of a morphism of schemes $f:Y\rightarrow X$ that is not of finite type, where $Y$ is Noetherian.
\end{counterexample}
\tcb{Joe's explanation of finite type}.
\begin{definition}[Noetherian Schemes]\label{Noetherian Schemes}
We say that a scheme $X$ is Noetherian iff it can be covered by finite number of open affine schemes $\Spec A_i$, where each $A_i$ is a Noetherian ring.
\end{definition}
\begin{lemma}
A scheme $X$ is Noetherian iff it's locally Noetherian and quasi-compact.
\end{lemma}